/*
Copyright 2008, 2009, 2010 Brightworks, Inc.

This file is part of Language Mentor.

Language Mentor is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Language Mentor is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Language Mentor.  If not, see <http://www.gnu.org/licenses/>.
*/
package com.langcollab.languagementor.view
{
    import com.langcollab.languagementor.constant.Constant_Misc;
    import com.langcollab.languagementor.model.MainModel;

    import flash.events.KeyboardEvent;

    import spark.components.View;
    import spark.transitions.SlideViewTransition;
    import spark.transitions.ViewTransitionDirection;
    import spark.transitions.ZoomViewTransition;
    import spark.transitions.ZoomViewTransitionMode;

    public class View_Base extends View
    {
        protected var transition_SlideView_Down:SlideViewTransition;
        protected var transition_SlideView_Left:SlideViewTransition;
        protected var transition_SlideView_Right:SlideViewTransition;
        protected var transition_SlideView_Up:SlideViewTransition;
        protected var transition_ZoomView_IN:ZoomViewTransition;
        protected var transition_ZoomView_OUT:ZoomViewTransition;

        public function View_Base()
        {
            super();
            transition_SlideView_Down = new SlideViewTransition();
            transition_SlideView_Down.direction = ViewTransitionDirection.DOWN;
            transition_SlideView_Down.duration = Constant_Misc.EFFECT__SLIDE_TRANSITION_DURATION;
            transition_SlideView_Left = new SlideViewTransition();
            transition_SlideView_Left.direction = ViewTransitionDirection.LEFT;
            transition_SlideView_Left.duration = Constant_Misc.EFFECT__SLIDE_TRANSITION_DURATION;
            transition_SlideView_Right = new SlideViewTransition();
            transition_SlideView_Right.direction = ViewTransitionDirection.RIGHT;
            transition_SlideView_Right.duration = Constant_Misc.EFFECT__SLIDE_TRANSITION_DURATION;
            transition_SlideView_Up = new SlideViewTransition();
            transition_SlideView_Up.direction = ViewTransitionDirection.UP;
            transition_SlideView_Up.duration = Constant_Misc.EFFECT__SLIDE_TRANSITION_DURATION;
            transition_ZoomView_IN = new ZoomViewTransition();
            transition_ZoomView_IN.mode = ZoomViewTransitionMode.IN;
            transition_ZoomView_IN.duration = Constant_Misc.EFFECT__ZOOM_TRANSITION_DURATION;
            transition_ZoomView_OUT = new ZoomViewTransition();
            transition_ZoomView_OUT.mode = ZoomViewTransitionMode.OUT;
            transition_ZoomView_OUT.duration = Constant_Misc.EFFECT__ZOOM_TRANSITION_DURATION;
        }

        // This needs to be public because the app does this:
        //   View_Base(navigator.activeView).onBackButtonPress();
        public function onBackButtonPress():void
        {
            navigator.popView();
        }


    }
}

